package com.itheima.work;

import java.io.*;

/**
 * @auther Macrydy
 * @date 2020/7/3 18:54
 * 使用字节缓冲流复制电脑上的图片文件.
 */
public class Test8 {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("4.jpg"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("day10IO\\copy.jpg"));
        int len;
        while ((len = bis.read()) != -1) {
            bos.write(len);
        }
        bos.close();
        bis.close();
    }
}
